# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=spi-tools
pkgver=1.0.2
pkgrel=0
pkgdesc="simple command line tools to help using Linux spidev devices"
url="https://github.com/cpb-/spi-tools"
arch="all !s390x !ppc64le"
license="GPL-2.0-or-later"
makedepends="autoconf automake linux-headers"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/cpb-/spi-tools/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -fim
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
9e4bb3d00d6f9885735e4e444b7422bba96c40309f9f0dbc93c06ae7147e0042a36e1f19157e95535a894efc0c88fd23ecef53247d3a129719681599390e353f  spi-tools-1.0.2.tar.gz
"
